<html>
<head><meta charset="utf-8"><title>Confused about ReErased · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Confused.20about.20ReErased.html">Confused about ReErased</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="230243433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Confused%20about%20ReErased/near/230243433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Confused.20about.20ReErased.html#230243433">(Mar 14 2021 at 14:56)</a>:</h4>
<p>I'm trying to understand MIR generation for a program. At one point I see reference to an expression with <code>ReErased</code> region. During MIR generation this region is used to generate more regions, but because this region is "erased" and does not have a <code>RegionVid</code> or something like that, the derived regions have no association with the original region, which doesn't seem right to me. (even though this program is compiled fine, this is just a detail I relized while reading the code and debug logs)</p>
<p>Where can I learn more about erased regions?</p>



<a name="230243545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Confused%20about%20ReErased/near/230243545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Confused.20about.20ReErased.html#230243545">(Mar 14 2021 at 14:58)</a>:</h4>
<p>I don't understand how can we borrow check this if we lose the relation between the receiver's region and returned value's region (or lifetime?).</p>



<a name="230256401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Confused%20about%20ReErased/near/230256401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Confused.20about.20ReErased.html#230256401">(Mar 14 2021 at 17:34)</a>:</h4>
<p>Borrowck runs MIR typeck to gather the lifetime constraints again as far as I know.</p>



<a name="230293869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Confused%20about%20ReErased/near/230293869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Confused.20about.20ReErased.html#230293869">(Mar 15 2021 at 04:30)</a>:</h4>
<p>Thanks. <del>Is there a way to dump MIR before and after type checking, to see the regions? -Zdump-mir does not dump pre/post type checking MIRs as far as I can see</del> It's the "renumbered" MIR</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>